<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                template="/templates/ui.xhtml">
    <ui:define name="head">
        <link type="text/css" href="#{request.contextPath}/UI/epss/epss.css" rel="stylesheet"/>
        <script type="text/javascript" src="#{request.contextPath}/UI/support/pub.js"/>
        <script type="text/javascript" language="javascript">
            document.onkeydown = function TabReplace() {
                if (event.keyCode == 13) {
                    if (event.srcElement.tagName != 'BUTTON')
                        event.keyCode = 9;
                    else
                        event.srcElement.click();
                }
            }
        </script>
    </ui:define>
    <ui:define name="content">
        <h:form id="form">
            <p:growl id="msgs" showDetail="false"/>
            <p:contextMenu id="pcm" for="ptt" rendered='#{itemTkcttEngMeaStlAction.strMngNotFinishFlag}'>
                <p:menuitem value="更新" icon="ui-icon-arrowrefresh-1-w"
                            actionListener="#{itemTkcttEngMeaStlAction.selectRecordAction('Upd')}"
                            update="pgViewForUpd,msgs,ptt,pgOperBtnForUpd"
			     onclick="PF('wVDlgViewForUpd').show()">
                </p:menuitem>
                <p:menuitem value="删除" icon="ui-icon-close"
                            actionListener="#{itemTkcttEngMeaStlAction.selectRecordAction('Del')}"
                            update="pgViewForDel,msgs,ptt,pgOperBtnForDel"
			     onclick="PF('wVDlgViewForDel').show()">
                </p:menuitem>
            </p:contextMenu>
            <p:dataTable id="ptt" style="width:100%;"
                     value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowList}"
                     var="record"
                     rowKey="#{record.tkctt_Pkid}"
                     selection="#{itemTkcttEngMeaStlAction.progEstMeaItemShowSelected}"
                     selectionMode="single"
                     paginatorTemplate="{FirstPageLink} {PreviousPageLink} {PageLinks}
                     {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                     paginator="true"
                     paginatorPosition="bottom"
                     rows="20"
                     rowsPerPageTemplate="500,200,100,50,30,20,10"
                     rowIndexVar="row"
                     emptyMessage="数据记录为空..."
                     rowStyleClass="#{record.tkctt_Unit eq null? 'rowDoneStyle':null}"
                     scrollable="true">
            <p:column headerText="序号" style="width:30px">
                <h:outputText value="#{row + 1}"/>
            </p:column>
            <p:column style="width:100px" headerText="编号">
                <h:outputText value="#{record.tkctt_StrNo}" escape="false"/>
            </p:column>
            <p:column style="width:200px" headerText="名称">
                <h:outputText value="#{record.tkctt_Name}" />
            </p:column>
            <p:column style="width:30px" headerText="单位">
                <h:outputText value="#{record.tkctt_Unit}" style="text-align:right"/>
            </p:column>
            <p:column style="width:80px" headerText="合同单价">
                <h:outputText value="#{record.tkctt_ContractUnitPrice}" style="text-align: right">
                    <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                </h:outputText>
            </p:column>
            <p:column style="width:80px" headerText="合同数量">
                <h:outputText value="#{record.tkctt_ContractQuantity}" style="text-align: right">
                    <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                </h:outputText>
            </p:column>
            <p:column style="width:100px" headerText="合同金额">
                <h:outputText value="#{record.tkctt_ContractAmount}" style="text-align: right">
                    <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                </h:outputText>
            </p:column>
            <p:column headerText="开累工程量" style="width:100px">
                <h:outputText value="#{record.eng_BeginToCurrentPeriodEQty}" style="text-align: right">
                    <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                </h:outputText>
            </p:column>
            <p:column headerText="开累工程额" style="width:100px">
                <h:outputText value="#{record.eng_BeginToCurrentPeriodEAmount}" style="text-align: right">
                    <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                </h:outputText>
            </p:column>
            <p:column headerText="当期工程量" style="width:100px">
                <h:outputText value="#{record.eng_CurrentPeriodEQty}" style="text-align: right">
                    <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                </h:outputText>
            </p:column>
            <p:column headerText="当期工程额" style="width:100px">
                <h:outputText value="#{record.eng_CurrentPeriodEAmount}" style="text-align: right">
                    <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                </h:outputText>
            </p:column>
        </p:dataTable>
        <p:dialog id="dlgViewForUpd" header="总包数量计量更新信息" widgetVar="wVDlgViewForUpd"
                  resizable="false" modal="true"
                  showEffect="clip" hideEffect="fold">
            <h:panelGrid id="pgViewForUpd">
                <h:panelGrid columns="4">
                    <p:outputLabel for="noItemHieRelapForUpd" value="编号:"/>
                    <h:inputText id="noItemHieRelapForUpd"
                                 value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowUpd.tkctt_StrNo}"
                                 style="background-color:gainsboro"
                                 readonly="true">
                    </h:inputText>
                    <p:outputLabel for="nameForUpd" value="名称:"/>
                    <h:inputText id="nameForUpd"
                                 value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowUpd.tkctt_Name}"
                                 style="background-color:gainsboro"
                                 readonly="true"/>
                    <p:outputLabel for="noteForUpd" value="备注内容:"/>
                    <h:inputText id="noteForUpd"
                                 value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowUpd.tkctt_Note}"
                                 style="background-color:gainsboro"
                                 readonly="true"/>
                    <p:outputLabel for="unitItemInfoForUpd" value="单位:"/>
                    <h:inputText id="unitItemInfoForUpd"
                                 value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowUpd.tkctt_Unit}"
                                 style="background-color:gainsboro"
                                 readonly="true"/>
                    <p:outputLabel for="contractUnitPriceItemInfoForUpd" value="合同单价:"/>
                    <h:inputText id="contractUnitPriceItemInfoForUpd"
                                 value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowUpd.tkctt_ContractUnitPrice}"
                                 style="background-color:gainsboro;text-align:right;"
                                 readonly="true">
                        <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                    </h:inputText>
                    <p:outputLabel for="contractQuantityItemInfoForUpd" value="合同数量:"/>
                    <h:inputText id="contractQuantityItemInfoForUpd"
                                 value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowUpd.tkctt_ContractQuantity}"
                                 style="background-color:gainsboro;text-align:right;"
                                 readonly="true">
                        <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                    </h:inputText>
                    <p:outputLabel for="eng_BeginToCurrentPeriodEQtyForUpd" value="开累工程量:"/>
                    <h:inputText id="eng_BeginToCurrentPeriodEQtyForUpd"
                                 value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowUpd.eng_BeginToCurrentPeriodEQty}"
                                 style="background-color:gainsboro;text-align:right;"
                                 readonly="true">
                        <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                    </h:inputText>
                    <p:outputLabel for="eng_CurrentPeriodEQtyForUpd" value="本期工程量:"/>
                    <h:inputText id="eng_CurrentPeriodEQtyForUpd"
                                 value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowUpd.eng_CurrentPeriodEQty}"
                                 style="text-align:right;">
                        <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                        <p:ajax event="blur" update="msgs,eng_BeginToCurrentPeriodEQtyForUpd"
                                listener="#{itemTkcttEngMeaStlAction.blurEng_CurrentPeriodEQty('blur')}"/>
                    </h:inputText>
                    <p:outputLabel for="originFlagItemInfoForUpd" value="数据来源:"/>
                    <h:inputText id="originFlagItemInfoForUpd"
                                 value="#{esCommon.originFlagListValueOfAlias(
	                                             itemTkcttEngMeaStlAction.progEstMeaItemShowUpd.eng_OriginFlag)}"
                                 style="background-color:gainsboro"
                                 readonly="true"/>
                    <p:outputLabel for="createdByItemInfoForUpd" value="创建人:"/>
                    <h:inputText id="createdByItemInfoForUpd"
                                 value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowUpd.eng_CreatedByName}"
                                 style="background-color:gainsboro"
                                 readonly="true"/>
                    <p:outputLabel for="createdDateItemInfoForUpd" value="创建时间:"/>
                    <h:inputText id="createdDateItemInfoForUpd"
                                 value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowUpd.eng_CreatedDate}"
                                 style="background-color:gainsboro"
                                 readonly="true"/>
                    <p:outputLabel for="lastUpdByItemInfoForUpd" value="修改人:"/>
                    <h:inputText id="lastUpdByItemInfoForUpd"
                                 value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowUpd.eng_LastUpdByName}"
                                 style="background-color:gainsboro"
                                 readonly="true"/>
                    <p:outputLabel for="lastUpdDateItemInfoForUpd" value="修改时间:"/>
                    <h:inputText id="lastUpdDateItemInfoForUpd"
                                 value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowUpd.eng_LastUpdDate}"
                                 style="background-color:gainsboro"
                                 readonly="true"/>
                    <p:outputLabel for="modificationNumItemInfoForUpd" value="修改次数:"/>
                    <h:inputText id="modificationNumItemInfoForUpd"
                                 value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowUpd.eng_ModificationNum}"
                                 style="background-color:gainsboro;text-align:right;"
                                 readonly="true">
                        <f:convertNumber type="number" pattern="#,###,###,###,##0"/>
                    </h:inputText>
                </h:panelGrid>
                <h:panelGrid id="pgOperBtnForUpd" columns="2">
                    <p:commandButton id="submitBtnForUpd"
                                     value="提交（更新）"
                                     action="#{itemTkcttEngMeaStlAction.submitThisRecordAction}"
                                     update="pgViewForUpd,ptt,msgs">
                    </p:commandButton>
                    <p:commandButton id="resetBtnForUpd" value="重置"
                                     type="reset"
                                     update="pgViewForUpd">
                    </p:commandButton>
                </h:panelGrid>
            </h:panelGrid>
        </p:dialog>
            <p:dialog id="dlgViewForDel" header="总包数量计量删除信息" widgetVar="wVDlgViewForDel"
                      resizable="false" modal="true"
                      showEffect="clip" hideEffect="fold">
                <h:panelGrid id="pgViewForDel">
                    <h:panelGrid columns="4">
                        <p:outputLabel for="noItemHieRelapForDel" value="编号:"/>
                        <h:inputText id="noItemHieRelapForDel"
                                     value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowDel.tkctt_StrNo}"
                                     style="background-color:gainsboro"
                                     readonly="true">
                        </h:inputText>
                        <p:outputLabel for="nameForDel" value="名称:"/>
                        <h:inputText id="nameForDel"
                                     value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowDel.tkctt_Name}"
                                     style="background-color:gainsboro"
                                     readonly="true"/>
                        <p:outputLabel for="noteForDel" value="备注内容:"/>
                        <h:inputText id="noteForDel"
                                     value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowDel.tkctt_Note}"
                                     style="background-color:gainsboro"
                                     readonly="true"/>
                        <p:outputLabel for="unitItemInfoForDel" value="单位:"/>
                        <h:inputText id="unitItemInfoForDel"
                                     value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowDel.tkctt_Unit}"
                                     style="background-color:gainsboro"
                                     readonly="true"/>
                        <p:outputLabel for="contractUnitPriceItemInfoForDel" value="合同单价:"/>
                        <h:inputText id="contractUnitPriceItemInfoForDel"
                                     value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowDel.tkctt_ContractUnitPrice}"
                                     style="background-color:gainsboro;text-align:right;"
                                     readonly="true">
                            <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                        </h:inputText>
                        <p:outputLabel for="contractQuantityItemInfoForDel" value="合同数量:"/>
                        <h:inputText id="contractQuantityItemInfoForDel"
                                     value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowDel.tkctt_ContractQuantity}"
                                     style="background-color:gainsboro;text-align:right;"
                                     readonly="true">
                            <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                        </h:inputText>
                        <p:outputLabel for="eng_BeginToCurrentPeriodEQtyForDel" value="开累工程量:"/>
                        <h:inputText id="eng_BeginToCurrentPeriodEQtyForDel"
                                     value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowDel.eng_BeginToCurrentPeriodEQty}"
                                     style="background-color:gainsboro;text-align:right;"
                                     readonly="true">
                            <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                        </h:inputText>
                        <p:outputLabel for="eng_CurrentPeriodEQtyForDel" value="本期工程量:"/>
                        <h:inputText id="eng_CurrentPeriodEQtyForDel"
                                     value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowDel.eng_CurrentPeriodEQty}"
                                     style="background-color:gainsboro;text-align:right;"
                                     readonly="true">
                            <f:convertNumber type="number" pattern="#,###,###,###,##0.00"/>
                        </h:inputText>
                        <p:outputLabel for="originFlagItemInfoForDel" value="数据来源:"/>
                        <h:inputText id="originFlagItemInfoForDel"
                                     value="#{esCommon.originFlagListValueOfAlias(
	                                             itemTkcttEngMeaStlAction.progEstMeaItemShowDel.eng_OriginFlag)}"
                                     style="background-color:gainsboro"
                                     readonly="true"/>
                        <p:outputLabel for="createdByItemInfoForDel" value="创建人:"/>
                        <h:inputText id="createdByItemInfoForDel"
                                     value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowDel.eng_CreatedByName}"
                                     style="background-color:gainsboro"
                                     readonly="true"/>
                        <p:outputLabel for="createdDateItemInfoForDel" value="创建时间:"/>
                        <h:inputText id="createdDateItemInfoForDel"
                                     value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowDel.eng_CreatedDate}"
                                     style="background-color:gainsboro"
                                     readonly="true"/>
                        <p:outputLabel for="lastUpdByItemInfoForDel" value="修改人:"/>
                        <h:inputText id="lastUpdByItemInfoForDel"
                                     value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowDel.eng_LastUpdByName}"
                                     style="background-color:gainsboro"
                                     readonly="true"/>
                        <p:outputLabel for="lastUpdDateItemInfoForDel" value="修改时间:"/>
                        <h:inputText id="lastUpdDateItemInfoForDel"
                                     value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowDel.eng_LastUpdDate}"
                                     style="background-color:gainsboro"
                                     readonly="true"/>
                        <p:outputLabel for="modificationNumItemInfoForDel" value="修改次数:"/>
                        <h:inputText id="modificationNumItemInfoForDel"
                                     value="#{itemTkcttEngMeaStlAction.progEstMeaItemShowDel.eng_ModificationNum}"
                                     style="background-color:gainsboro;text-align:right;"
                                     readonly="true">
                            <f:convertNumber type="number" pattern="#,###,###,###,##0"/>
                        </h:inputText>
                    </h:panelGrid>
                    <h:panelGrid id="pgOperBtnForDel">
                        <p:commandButton id="submitBtnForDel"
                                         value="提交（删除）"
                                         action="#{itemTkcttEngMeaStlAction.submitThisRecordAction}"
                                         update="pgViewForDel,ptt,msgs">
                        </p:commandButton>
                    </h:panelGrid>
                </h:panelGrid>
            </p:dialog>
    </h:form>
</ui:define>
</ui:composition>